package com.demo.feign.client.fallback;


import com.demo.feign.client.UserServiceClient;
import com.demo.feign.dto.UserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class UserServiceClientFallBack implements UserServiceClient{

    @Override
    public UserDTO getUserById(Long id) {
        log.info("id:{} fallback",id);
        return UserDTO.builder().id(id).userName("fallback").build();
    }
}
